package cn.edu.pku.ss.music.activities;

import cn.edu.pku.ss.music.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.ViewStub;
import android.widget.Button;

public class WelcomeActivity extends Activity {
	private Button login_button;
	private Button create_account_button;
	
//	private static final int CREATE_ACCOUNT_CODE = 10;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.welcome_layout);
		ViewStub welcome_button_area = (ViewStub) findViewById(R.id.welcome_button_area);
		welcome_button_area.inflate();
		
        login_button = (Button) findViewById(R.id.login_btn);
        create_account_button = (Button) findViewById(R.id.create_account_btn);
        
        login_button.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View arg0) {
				Intent intent = new Intent(WelcomeActivity.this, LoginActivity.class);
//				Intent intent = new Intent(WelcomeActivity.this, PortalActivity.class);
				startActivity(intent);
			}
		});        
        
        create_account_button.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
//				Intent intent = new Intent(WelcomeActivity.this, ProtocolActivity.class);
				Intent intent = new Intent(WelcomeActivity.this, RegisterActivity.class);
				startActivity(intent);
			}
		});
	}
}
